<%@ page import="com.entity.Student" %>
<%@ page import="dao.StudentDao" %>
<%@ page import="dao.impl.StudentDaoImpl" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 钱多多的钱罐罐
  Date: 2022/3/23
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>


<table border="1px">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>地址</th>
        <th>出生日期</th>
        <th colspan="2">操作</th>

    </tr>
    <%

        StudentDao dao=new StudentDaoImpl();
        List<Student>studentList=dao.findAll();
        for (Student student:studentList) {%>

    <tr><td><%=student.getStudentname()%></td>
        <td><%=student.getStudentno()%></td>
        <td><%=student.getAddress()%></td>
        <td><%=student.getBorndate()%></td>

        <td><a href="control.jsp?studentno=<%=student.getStudentno()%>"target="_blank">删除</a></td>
        <td><a href="add.jsp" studentname=<%=student.getStudentname()%>target="_blank">更新</a></td>
    </tr>
   <%
       }
   %>
</table>
</body>
</html>
